# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=libwpebackend-fdo
pkgver=1.12.0
pkgrel=0
pkgdesc="freedesktop.org backend for WPE WebKit"
url="https://wpewebkit.org/"
arch="all"
license="BSD-2-Clause"
depends_dev="$pkgname"
makedepends="mesa-dev meson glib-dev wayland-dev libwpe-dev libepoxy-dev"
options="!check" # no tests
subpackages="$pkgname-dbg $pkgname-dev"
source="https://github.com/Igalia/WPEBackend-fdo/releases/download/$pkgver/wpebackend-fdo-$pkgver.tar.xz"
builddir="$srcdir/wpebackend-fdo-$pkgver"

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

dev() {
	default_dev

	# this .so symlink needs to be in the main package
	mv "$subpkgdir"/usr/lib/libWPEBackend-fdo-1.0.so "$pkgdir"/usr/lib
}

sha512sums="
856885394872ad3f205b600caecbae48ae0c51185a8e19e66add93222e49bb1b060cdc77f5c9269d43509a0b85af0b5642c27f951d1c9836d8616aa51a9180a5  wpebackend-fdo-1.12.0.tar.xz
"
